/*
atom.dm
Declarations made on the basic atom datum can be found here.
Included:
	bumped 	called when the movable atom is bumped, so there isn't a giant bump() proc
*/

atom
	icon='base.dmi'

	movable
		Bump(atom/movable/o)
			.=..()
			if(istype(o))o.Bumped(src)

		proc
			Bumped(atom/ref)
				..()
			use()

	proc
		InCone(atom/center = usr, dir = NORTH)
			var/d = get_dir(center, src)
			if(d == dir) return 1
			if(dir & (dir-1))
				return (d & dir) ? 1 : 0
			if(!(d & dir)) return 0
			var/dx = abs(x - center.x)
			var/dy = abs(y - center.y)
			if(dx == dy) return 1
			if(dy > dx)
				return (dir & (NORTH|SOUTH)) ? 1 : 0
			return (dir & (EAST|WEST)) ? 1 : 0
